﻿using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    public interface ITReceivingGoodsDetailRepository : IBaseRepository<TReceivingGoodsDetail>
    {
        /// <summary>
        /// 根据入库单id查询入库单货明细
        /// </summary>
        /// <param name="orderDetailid">入库单id</param>
        /// <returns></returns>
        List<TReceivingGoodsDetail> GetReceivingGoodsDetailList(int orderDetailid);

        bool AddReceivingGoodsDetail(List<TReceivingGoodsDetail> receivingGoodsDetails);

        /// <summary>
        /// 根据单位名称获取id
        /// </summary>
        /// <param name="unitName"></param>
        /// <returns></returns>
        int GetUnitIdByUnitName(string unitName);

        /// <summary>
        /// 根据装备编码查询装备id
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        int GetMaterialCategoryByCode(string code);

        /// <summary>
        /// 判断编码是否带Z
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        bool CodeContainZ(string code,out string msg);

        /// <summary>
        /// 判断编码是否存在
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        bool CodeDoesItExist(string code,string name,out string msg);
    }
}
